#ifndef WF_BLOCKSCREATE_H
#define WF_BLOCKSCREATE_H

#include "pf_previewactioninterface.h"
#include "pf_insert.h"
#include "gui_export.h"

/**
 * This action class can handle user events for creating blocks from 
 * existing entities.
 *
 */
class GUI_EXPORT WF_BlocksCreate : public PF_PreviewActionInterface {
	Q_OBJECT
public:
    /**
     * Action States.
     */
    enum Status {
        SetReferencePoint,    /**< Setting the reference point. */
		ShowDialog            /**< Showing dialog for name. */
    };

public:
    WF_BlocksCreate(PF_Container& container,
                        PF_GraphicView& graphicView);
    ~WF_BlocksCreate();
	
	static QAction* createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/);
	
	virtual LX_Define::ActionType rtti() {
		return LX_Define::ActionBlocksCreate;
	}

    virtual void init(int status=0);

    virtual void trigger();

    virtual void mouseMoveEvent(PF_MouseEvent* e);
    virtual void mouseReleaseEvent(PF_MouseEvent* e);

    virtual void coordinateEvent(PF_CoordinateEvent* e);
    //virtual void commandEvent(PF_CommandEvent* e);
	//virtual PF_StringList getAvailableCommands();

	//virtual void showOptions();
	//virtual void hideOptions();

    virtual void updateMouseButtonHints();
    virtual void updateMouseCursor();
    virtual void updateToolBar();

protected:
	PF_Vector referencePoint;
};

#endif
